import {
	Http
} from '../utils/request.js'

class shopCar extends Http {
  
  // 购物车列表
apishopCartList(data) {
  return this.request({
    url: '/shoppingcart/list',
    method: 'post',
    data,
    loading: true
  })
}
apishopCarNum(data) {
  return this.request({
    url: '/shoppingcart/car-num',
    method: 'post',
    data,
    loading: true
  })
}

//添加到购物车
apishopCartSave(data){
  return this.request({
    url: '/shoppingcart/save',
    method: 'post',
    header:{
      'Content-Type':'application/json;charset=UTF-8'
    },
    data,
    loading: false
  })
}
//修改到购物车
apishopCartUpdate(data){
  return this.request({
    url: '/shoppingcart/update',
    method: 'post',
    data,
    loading: false
  })
}
//删除到购物车
apishopCartDelete(data){
  return this.request({
    url: '/shoppingcart/delete',
    method: 'post',
    data,
    loading: false
  })
}
}
export default new shopCar()